<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/jquery-2.1.1.js" type="text/javascript"></script>
    <script src="js/vue.js" type="text/javascript"></script>
</head>
<body>
<div id="app">
    <table border="1px" cellspacing="0px" cellspadding="0px" width="100%">
        <tr>
            <td>编号</td>
            <td>名称</td>
            <td>用户名</td>
            <td>密码</td>
            <td>邮箱</td>
            <td>电话</td>
            <td>生日</td>
            <td>性别</td>
            <td>code</td>
        </tr>
        <tr v-for="user in users">
            <td>{{user.uid}}</td>
            <td>{{user.name}}</td>
            <td>{{user.username}}</td>
            <td>{{user.password}}</td>
            <td>{{user.email}}</td>
            <td>{{user.telephone}}</td>
            <td>{{user.birthday}}</td>
            <td>{{user.sex}}</td>
            <td>{{user.code}}</td>
        </tr>
    </table>
</div>
</body>
<script type="text/javascript">
    var vueApp;
    $(function () {
        vueApp = new Vue({
            el: '#app',
            data: {
                users: []
            },
            mounted: function () {
                this.userInfoAjax();
            },
            methods: {
                userInfoAjax: function () {
                    var vueData = this;
                    //获取全部的用户信息
                    $.post("/user/ajaxSelectUser", function (data) {
                        vueData.users = data;
                    }, "json");
                }

            }
        });
    });

</script>
</html>